import { _decorator, Node } from 'cc';
import { LoadPanelBase } from './LoadPanelBase';
import { autoNode, Singleton } from '../Manager/BaseManager';
const { ccclass, property } = _decorator;

export class OpenLoadModel extends Singleton {
  className: string = 'OpenLoadModel';
  loadRes: string = 'maingame/loading/OpenLoadPanel';
}

@ccclass('OpenPanelLoad')
export class OpenLoadPanel extends LoadPanelBase {
  @autoNode()
  bg: Node;
  Complete(): void {}
  override blackMask: number = 0;
  override clickBackClose: boolean = false;
  showCount: number = 0;
  protected onEnable(): void {
    super.onEnable();
    this.bg.active = this.showCount < 2;
    this.showCount = this.showCount + 1 >= 2 ? 2 : this.showCount + 1;
  }
}
